Skip to content

refactor(drivers/139): adapt new capacity calculation#2651

Merged
xrgzs merged 1 commit into
OpenListTeam:mainfrom
xrgzs:fix/139-space
Jun 24, 2026
Merged

refactor(drivers/139): adapt new capacity calculation#2651
xrgzs merged 1 commit into
OpenListTeam:mainfrom
xrgzs:fix/139-space

Conversation

@xrgzs

@xrgzs xrgzs commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary / 摘要

重构磁盘信息获取逻辑,合并个人和家庭磁盘信息请求为统一的配额详情请求,适配新版移动云盘容量计算

  • This PR has breaking changes.
    / 此 PR 包含破坏性变更。
  • This PR changes public API, config, storage format, or migration behavior.
    / 此 PR 修改了公开 API、配置、存储格式或迁移行为。
  • This PR requires corresponding changes in related repositories.
    / 此 PR 需要关联仓库同步修改。

Related repository PRs / 关联仓库 PR:

  • OpenList-Frontend:
  • OpenList-Docs:

Related Issues / 关联 Issue

Close: https://github.com/orgs/OpenListTeam/discussions/2352

Testing / 测试

  • go test ./...
❯ go test ./drivers/139 
?       github.com/OpenListTeam/OpenList/v4/drivers/139 [no test files]
  • Manual test / 手动测试: TODO

Before:

561be9e98224ae55ecaf273162e00d21

After:

4b6487d5b12668b0190be97c5ebb3187

Checklist / 检查清单

  • I have read CONTRIBUTING.
    / 我已阅读 CONTRIBUTING
  • I confirm this contribution follows the repository license, contribution policy, and code of conduct.
    / 我确认此贡献符合仓库许可证、贡献规范和行为准则。
  • I have formatted the changed code with gofmt, go fmt, or prettier where applicable.
    / 我已按适用情况使用 gofmtgo fmtprettier 格式化变更代码。
  • I have requested review from relevant maintainers or code owners where applicable.
    / 我已在适用情况下请求相关维护者或代码所有者审查。

@xrgzs xrgzs added the Module: Driver Driver-Related Issue/PR label Jun 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the China Mobile 139 driver’s storage quota retrieval to use a unified “quota detail” endpoint, aligning reported total/used space with the platform’s newer capacity calculation behavior.

Changes:

  • Replaced separate personal/family disk info requests with a single getDiskQuotaDetail request to /user/disk/quota/detail.
  • Updated quota response typing (DiskQuotaDetail) and simplified usage computation in GetDetails.
  • Removed now-unused legacy family disk info logic and MD5 helper/import.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
drivers/139/util.go Switches disk info retrieval to the new quota detail endpoint and removes legacy helpers.
drivers/139/types.go Replaces old disk info response types with the new DiskQuotaDetail model.
drivers/139/driver.go Updates GetDetails to compute total/used space from the new quota detail response.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread drivers/139/types.go
@xrgzs xrgzs marked this pull request as ready for review June 24, 2026 16:42
@xrgzs xrgzs requested a review from jyxjjj June 24, 2026 16:42
@xrgzs xrgzs merged commit e960035 into OpenListTeam:main Jun 24, 2026
12 checks passed
@xrgzs xrgzs deleted the fix/139-space branch June 24, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module: Driver Driver-Related Issue/PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants